﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace 深入浅出WPF_BookDemo
{
    /// <summary>
    /// PrivateInner.xaml 的交互逻辑
    /// </summary>
    public partial class PrivateInner : UserControl, INotifyPropertyChanged
    {
        public PrivateInner()
        {
            InitializeComponent();
            this.DataContext = InnerText;
        }


        public string InnerText
        {
            get { return this.text02.Text; }
            set
            {
                this.text02.Text = value;
                this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("InnerText"));
            }
        }

        public event PropertyChangedEventHandler? PropertyChanged;


        //this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Name"));
    }

}
